package com.token.sysorg.enumerate;

/**
 * @author chenjianxiong 2020/4/21
 */
public enum ActionTypeEnum {
    LOADCOMINFO(1,"加载公司信息"),
    LOADDETINFO(2,"加载部门信息"),
    LOADPOSTINFO(3,"加载岗位信息");

    private final int id;
    private final String name;
    ActionTypeEnum(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public String getName(){
        return name;
    }

    public static ActionTypeEnum getTypeByValue(int value){
        for (ActionTypeEnum enums : ActionTypeEnum.values()) {
            if (enums.getId()==value) {
                return enums;
            }
        }
        return null;
    }
}
